home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 3 #5
/
Commodore_Disk_User_Vol.3_5_1990_-.d64
/
scrn manipulator
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
7KB
|
131 lines
1 a=a+1:ifa=1thenpoke53280,14:poke53281,6:poke53265,11:load"sm.code",8,1
2 fori=1to8:sys49158,i,14:next:sys49158,4,6:sys49158,6,6:poke16383,0:sys49155
3 sys49158,0,102:sys49158,9,8:poke53265,11:print"[147][158] [172][162][187] [162][162] [162][162][187][172][162][162][187][162][162][162][172][187][172][187]
4 [153]" newgetwaitgetlogcos getwaitget get coswaitget open(NULL)rogrammed by
5 print"[158] [188][162][188][161][146][161] [146][190][161][172][146][190] [162][161][172] [146][161] [159][202]ason [198]inch
6 [153]"sys rndwaitnew*waitloglogcoswaitcos waitlogloggetlogwaitnewrnd waitnewnewgetwaitgetgetwaitget
7 print"[158] [146][187][190][146][161][172] [146][187][161][188][161][146][161][187][172][161][172][187][146][187] [161][146][161] [172] [146][187][188][187][172][146][190][190][162][188][161][172][187][146][187]
8 [153]"sys waitget waitnew get waitgetgetwaitgetgetlogcoswaitcos getwaitget waitnew getwaitget getlogcoswaitcos
9 print"[158] [146][188][161][146][161] [161][146][161][187][146][161][161][146][161][161][146][161] [161][146][161] [161][146][161] [161][172][188]
10 [153]"sys newwait logcosnewnewwaitlogcoslogcosnewnewwaitlogcos lognewwaitcoslognewnewwaitcosnewnewwait logcos lognewwaitcoslogcoslogcos"
11 [153]"list (NULL)he ultimate screen manipulation":[151]53265,27:[151]53281,6
12 [153]" system for your lenommodore 64"
13 [153]"cont"," (NULL)lease wait..."
14 [151]52,62:[151]56,62:[156]:[151]56334,[194](56334)[175]254:[151]1,[194](1)[175]251
15 a$[178]"p returns:"[170][196]([181]([187](1)[172]9999)[170]1e4):[129]i[178]0[164]23:sn[178]248[170][181](i[173]3)
16 sa[178]sn[172]64[170]x:a[178][198]([202](a$,i[170]1,1)):[129]j[178]1[164]8:[151]sa[170]j[172]3,[194](55295[170]a[172]8[170]j)
17 [130]:[129]j[178]9[164]20:[151]sa[170]j[172]3,0:[130]:x[178]x[170]1:x[178]x[170]3[172](x[178]3):[151]sa,0:[130]
18 [151]1,[194](1)[176]4:[151]56334,[194](56334)[176]1
19 [129]i[178]1[164]8:[158]49158,i,0:[130]:[158]49158,4,6:[158]49158,6,6
20 [158]49152:[153]"load (NULL)he normal screen configuration is"
21 [153]" acceptable for a lot of applications.
22 print" [200]owever, you may have designed a game
23 [153]" that requires a landscape. (NULL)ith simple
24 print" raster scan graphics it is possible to
25 [153]" produce a second colour. (NULL)et's also
26 print" add a background...":poke53264,14:fori=1to3:poke53248+i*2,-16+i*24
27 next:fori=0to3:poke53249+i*2,0:poke53287+i,1:poke2040+i,248+i:next
28 poke53248,240:poke53271,15:poke53269,15:poke198,0:wait197,1:sys49158,6,5
29 sys49158,4,14:print"[147]","[151][180]",,"[157][157][172] [146][187] [151][221]"
30 print" [172] [146][187][151][180] [172] [146][187] [172] [152] [152] [146][187][151][221]"
31 print" [172] [152] [152] [146][187] [151][219] [172] [152] [146][187] [151][171] [152] [152] [146][151][179]"
32 print" [152] [152] [146] [151][221] [152] [146][172] [167] "
33 print" [146] [151][221] [165] [167] [152] [152] "
34 print" [152] [152] [146] [151][221] [152] [152] [165][152] [152][167] [152] [152] [146][187]"
35 print" [152] [152] [146] [151][221] [152] [152] [165][152] [152][167] [152] [165][152][167] "
36 print" [152] [146][151] [221] [152] [180] [152][170] [152] [180][152][170] "
37 print"[144] [212]his could be classed as satisfactory
38 [153]" although, again with simple raster
39 print" scan graphics, we can eliminate the"
40 print" left and right borders...":poke198,0:wait197,1:sys49158,3,14:sys49158,5,5
41 goto44
42 print"":fori=0to7:print" ":next
43 print"[145][145][145][145][145][145][145]";:return
44 gosub42:print" [215]e[160] could also eliminate one or other
45 [153]" of the black lines...":[151]198,0:[146]197,1:[158]49158,1,14:[158]49158,2,14
46 [153]" (NULL)r we could get rid of both of them...":[129]t[178]1[164]100:[130]
47 [151]198,0:[146]197,1:[158]49158,7,5:[158]49158,8,5:[141]42
48 [153]" (NULL)o give a closemore arcade-game looking
49 print" display we can add the left and right
50 [153]" borders again but leave the upper and":[153]" lower as they are..."
51 [151]198,0:[146]197,1:[158]49158,3,0:[158]49158,5,0:[141]42
52 [153]" (NULL)he corners of the screen should be
53 print" black but with standard [210][211][199]s this is
54 [153]" not possible. (NULL)sing (NULL)creen (NULL)anipulator
55 print" you will have no trouble...":poke198,0:wait197,1:sys49158,1,0
56 sys49158,7,0:gosub42:print" [217]ou may wish to add another section of
57 [153]" border in which score details, etc
58 print" could be displayed...":poke198,0:wait197,1
59 sys49158,8,0:fori=0to3:poke53291+i,2:next:poke53277,240
60 fori=4to7:poke53248+i*2,-160+i*48:poke53249+i*2,4:poke2040+i,248+i:next
61 poke53269,255:gosub42:print" [201]f you prefer, just have the corners
62 [153]" of the screen a different colour...":[151]198,0:[146]197,1
63 [158]49158,3,14:[158]49158,5,5:[158]49158,8,5
64 [141]42:[153]" (NULL)o summarise, there are eight sections
65 print" to the screen and each[160] one[160] can be
66 [153]" coloured differently...":[151]198,0:[146]197,1:[151]53269,15:[153]"load"
67 c(0)[178]102:c(9)[178]8:[129]i[178]1[164]8:[135]c(i):[158]49158,i,c(i):[130]:[131]0,15,7,10,8,2,12,11
68 [153]"stop (NULL)he user-definable split can be moved"
69 [153]" either up or down...":x[178]102:d[178]1:[151]198,0
70 x[178]x[170]d:d[178]d[170]2[172](x[178]118)[171][180](x[178]0):[158]49158,0,x:[161]a$:[139]a$[179][177][199](13)[167]70
71 [139]x[178]102[167]75
72 [129]i[178]x[164]102[169][180](102[171]x)[172]2:[158]49158,0,i:[130]:[158]49158,9,4:[151]650,255
73 [153]"loadstop (NULL)ometimes a flicker develops. peekut by
74 print" altering a timing constant you can
75 [153]" effectively move this out of view...":x[178]4:d[178]1:[151]198,0
76 x[178]x[170]d:d[178]d[170]1[172](x[178]60)[171][180](x[178]4):[158]49158,9,x[172].25:[161]a$:[139]a$[179][177][199](13)[167]76
77 [129]i[178]0[164]3:c(i[172]2[170]1)[178]14:c(i[172]2[170]2)[178]6:[130]
78 [153]"load":[129]i[178]0[164]3:[158]49158,1[170]i[172]2,5:[158]49158,2[170]i[172]2,11:[130]:[151]53269,0
79 [158]49158,9,6:[153]"loadsys "[199](34)"(NULL)len(NULL)valval(NULL) (NULL)atn(NULL)right$(NULL)(NULL)(NULL)atn(NULL)(NULL)(NULL)"[199](34)" peeky mid$ason ascinch
80 print,"[150][207]ptions screen":print"[155]","f1: [195]hange parameters"
81 print"[155]","f3: [211]ave code":print"[155]","f5: [209]uit program"
82 geta$:ifa$="[133]"then116
83 ifa$="[135]"thenprint"[147][211]creen [205]anipulator":print"[194]y [202]ason [198]inch":new
84 ifa$<>"[134]"then82
85 print"[147][158] "chr$(34)"[211][195][210][197][197][206] [205][193][206][201][208][213][204][193][212][207][210]"chr$(34)" [194]y [202]ason [198]inch"
86 print," [150][211]ave [195]ode [207]ption":print"[155] [204]oad code to what address?: 49152";
87 print"[157][157][157][157][157][157]"chr$(34)"";:open1,0:input#1,a$:close1:a=val(a$)
88 ifa>2051anda<65177then90
89 print:print"[153] [195]ode [195][193][206][206][207][212] start at[159]"a:fort=1to1000:next:goto78
90 lc=a:print:print"[155] [196]o you want the code to autoboot ([217]/[206])":poke198,0:ab=0
91 geta$:ifa$="y"thenab=1:goto93
92 ifa$<>"n"then91
93 sys49155:fori=0to9:sys49158,i,c(i):next:poke53265,27
94 print"[147][207][203]. [208]lease wait. [215]orking...":fori=0to359:poke1664+i,peek(49152+i)
95 next:restore:fori=0to7:reada:next:fori=0to32:reada,b:a=1664+a:b=b+lc
96 pokea,(b/256-int(b/256))*256:pokea+1,b/256:next:b=lc+104:poke1732,b/256
97 poke1730,(b/256-int(b/256))*256
98 data1,61,4,37,7,270,10,317,62,37,111,22,114,22,131,22,147,12,150,13
99 data180,14,183,15,192,23,212,24,218,16,221,17,251,18,254,19,271,25,276,25
100 data284,23,292,25,295,24,305,25,314,11,318,25,323,20,326,25,331,21,336,12
101 data339,20,344,21,347,12
102 ifab=0thensa=1664:ac=lc:goto110
103 fori=0to82:reada:poke1581+i,a:next:data54,3,237,246,62,241,47,243,102,254
104 data165,244,237,245,0,0,120,169,202,162,241,141,38,3,142,39,3,88,162,0,189
105 data121,3,157,0,0,232,208,247,189,121,4,157,0,0,232,224,136,208,245,32,0,0
106 data169,78,162,69,160,87,141,119,2,142,120,2,140,121,2,169,13,162,147,160,5
107 data141,122,2,142,123,2,132,198,96
108 sa=1581:ac=806:a1=(lc/256-int(lc/256))*256:a2=lc/256
109 poke1615,a1:poke1616,a2:poke1632,a1:poke1633,a2:poke1624,a1:poke1625,a2+1
110 print,,"[145][157][157][211]aving code...":open2,8,1,"@:sm.code"+str$(lc)+",p,w"
111 print#2,chr$((ac/256-int(ac/256))*256)chr$(ac/256);
112 fori=sato2023:print#2,chr$(peek(i));:next:close2
113 open15,8,15:input#15,a,a$,b,c:close15:ifa=0thensys49152:goto78
114 print"[147] [196]isk [197]rror number"a"[157]:":print" "a$" @"b"[157],"c
115 print" [208]ress any key":poke198,0:wait198,1:poke198,0:sys49152:goto78
116 c=c(6)and15:poke646,abs(c=0orc=2orc=6orc=9orc=11)
117 print"[147] f1-f8:"spc(11)"[195]hange colours"
118 print" [195]rsr [213]p/[196]own: [193]lter split position"
119 print" [195]rsr [204]eft/[210]ight: [212]iming constant"
120 print" [193]ny other key: [205]ain options screen"
121 fori=0to9:sys49158,i,c(i):next
122 geta$:ifa$="[145]"thenc(0)=c(0)+1*(c(0)>0):sys49158,0,c(0):goto122
123 ifa$=""thenc(0)=c(0)-1*(c(0)<119):sys49158,0,c(0):goto122
124 ifa$="[157]"thenc(9)=c(9)+1*(c(9)>1):sys49158,9,c(9):goto122
125 ifa$=""thenc(9)=c(9)-1*(c(9)<16):sys49158,9,c(9):goto122
126 ifa$=""then122
127 ifa$<"[133]"ora$>"[140]"then78
128 c=val(mid$("13572468",asc(a$)-132,1))
129 c(c)=c(c)+1:c(c)=c(c)+16*(c(c)=16):sys49158,c,c(c)
130 onabs(a$="[139]")+1goto122,116